<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>动画播放前后的状态</title>
    <style media="screen">
        div{
            width: 50px;
            height: 50px;
            background-color: green;
            -webkit-animation-name:mybox;
            -webkit-animation-duration:5s;
            -webkit-animation-delay:1s;
            -webkit-animation-fill-mode:forwards;/*设置播放前后的状态*/
        }
        @-webkit-keyframes mybox{
            0%{transform: translate(0,0);}
            25%{transform: translate(0,200px);}
            50%{transform: translate(200px,0);}
            100%{transform: translate(200px,200px);}
            /*100%{transform: translate(0px,0px);}*/
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>
